﻿using System;
using BSDS.Core.Model.Services.Jobs;

namespace BSDS.Commands.Commands.Implementation.Jobs
{
    public class CheckJobCommand : CommandBase
    {
        private readonly string jobId;
        private readonly JobService jobService;

        public CheckJobCommand(string jobId, JobService jobService)
        {
            this.jobId = jobId;
            this.jobService = jobService;
        }

        public override CommandResult Execute(ExecutionContext context)
        {
            var details = jobService.GetLongDetailsMessage(jobId);

           Console.WriteLine(details);

           return CommandResult.Success();
        }
    }
}